{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 资产管理
    <span class="c-gray en">&gt;</span> 提币记录
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="/money/invest" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form  method="get" action="">
        <div class="text-c">
            日期范围：
            <input type="text" onfocus="WdatePicker()" value="{:input('get.start')}" name="start" id="datemin" class="input-text Wdate" style="width:120px;" autocomplete="off">
             -
            <input type="text" onfocus="WdatePicker()" value="{:input('get.end')}" name="end" id="datemax" class="input-text Wdate" style="width:120px;" autocomplete="off">
            <input type="text" class="input-text" style="width:100px" placeholder="UID|手机号|账号" value="{:input('word')}" name="word">
            <input type="text" class="input-text" style="width:200px" placeholder="来源地址" value="{:input('from_address')}" name="from_address">
            <input type="text" class="input-text" style="width:200px" placeholder="转入地址" value="{:input('to_address')}" name="to_address">
            <span class="select-box" style="width: 100px">
                <select name="coin_symbol" class="select">
                    <option value="0">币种</option>
                    <option value="EUSDT" {if isset($_GET['coin_symbol']) && $_GET['coin_symbol'] == 'EUSDT'}selected{/if}>EUSDT</option>

                </select>
            </span>
            <span class="select-box" style="width: 100px">
               <select name="status" class="select">
                <option value="-1">状态</option>
                <option value="0" {if isset($_GET['status']) && $_GET['status'] == '0'}selected{/if}>审核中</option>
                   <option value="1" {if isset($_GET['status']) && $_GET['status'] == '1'}selected{/if}>转账中</option>
                   <option value="2" {if isset($_GET['status']) && $_GET['status'] == '2'}selected{/if}>转账成功</option>
                   <option value="3" {if isset($_GET['status']) && $_GET['status'] == '3'}selected{/if}>转账失败</option>
                   <option value="4" {if isset($_GET['status']) && $_GET['status'] == '3'}selected{/if}>审批拒绝</option>
            </select>
            </span>
            <span class="select-box" style="width: 100px">
               <select name="type" class="select">
                <option value="-1">类型</option>
                   <option value="1" {if isset($_GET['type']) && $_GET['type'] == '1'}selected{/if}>内部</option>
                   <option value="2" {if isset($_GET['type']) && $_GET['type'] == '2'}selected{/if}>外部</option>
            </select>
            </span>
            <button type="submit" class="btn btn-success">搜索</button>
        </div>
    </form>

    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
        </span>
        <span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-hover table-bg">
        <thead>
            <tr>
                <th scope="col" colspan="10">账户列表</th>
            </tr>
            <tr class="text-c">
                <th width="30">ID</th>
                <th width="100">UID</th>
                <th width="80">类型</th>
                <th width="80">订单号</th>
                <th width="80">币种</th>
                <th width="100">提币金额</th>
                <th width="100">用户地址</th>
                <th width="100">转出地址</th>
                <th width="100">手续费费率/金额</th>
                <th width="100">交易hash</th>
                <th width="100">日志</th>
                <th width="80">时间</th>
                <th width="30">状态</th>
            </tr>
        </thead>
        <tbody>
            {foreach $list as $v}
            <tr class="text-c">
                <td>{$v.id}</td>
                <td>{$v.uid}-{$v.username}-{$v.mobile}</td>
                <td>
                    {switch name=$v.type}
                    {case value="1"}
                    内部转账
                    {/case}
                    {case value="2"}外部提现{/case}
                    {default /}--
                    {/switch}
                </td>
                <td>{$v.transaction_no}</td>
                <td>{$v.coin_symbol}</td>
                <td>{$v.amount}</td>
                <td>{$v.from_address}</td>
                <td>{$v.to_address}</td>
                <td>{$v.fee_rate}-{$v.fee}</td>
                <td>{$v.txid}</td>
                <td>{$v.log}{$v.cause}</td>
                <td>{:date('Y-m-d H:i:s',$v['time'])}</td>
                <td>
                    {switch name=$v.status}
                    {case value="0"}
                    <a class="btn btn-default radius" title="个人信息" href="javascript:;" onclick="layopen('个人信息','{:url('tixiansp',['id'=>$v.id])}')">审核</a>
                    {/case}
                    {case value="1"}转账中{/case}
                    {case value="2"}转账成功{/case}
                    {case value="3"}转账失败{/case}
                    {default /}审批拒绝
                    {/switch}

                </td>
            </tr>
            {/foreach}
        </tbody>
    </table>
    <div class="page">
        {$list->render()|raw}
    </div>
</div>

{include file="public/footer" /}
<script type="text/javascript">
    function member_start(obj,id,status){
        if(status == 2){
            var info = '确认要标记为已转账么？';
        }else{
            var info = '确认拒绝用户的提币申请吗？';
        }
        layer.confirm(info,function(index){
            $.ajax({
                type: 'POST',
                url: "{:url('tbCoinStatus')}",
                data: {id:id,status:status},
                dataType: 'json',
                success: function(data){
                    if(data.status == 'y'){
                        layer.msg("操作成功",{icon:1,time:1000,shade: [0.3, '#000']},function(){
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.location.reload();
                            parent.layer.close(index);
                        });
                    }else{
                        layer.msg(data.info,{icon:2,time:1000,shade: [0.3, '#000']});
                    }
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
</script>